
package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;


@Entity
@Table(name = "reservasi", catalog = "sirere", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Reservasi.findAll", query = "SELECT r FROM Reservasi r"),
    @NamedQuery(name = "Reservasi.findById", query = "SELECT r FROM Reservasi r WHERE r.id = :id"),
    @NamedQuery(name = "Reservasi.findByNama", query = "SELECT r FROM Reservasi r WHERE r.nama = :nama"),
    @NamedQuery(name = "Reservasi.findByTelepon", query = "SELECT r FROM Reservasi r WHERE r.telepon = :telepon"),
    @NamedQuery(name = "Reservasi.findByEmail", query = "SELECT r FROM Reservasi r WHERE r.email = :email"),
    @NamedQuery(name = "Reservasi.findByReservasi", query = "SELECT r FROM Reservasi r WHERE r.reservasi = :reservasi"),
    @NamedQuery(name = "Reservasi.findByTanggal", query = "SELECT r FROM Reservasi r WHERE r.tanggal = :tanggal"),
    @NamedQuery(name = "Reservasi.findByAcara", query = "SELECT r FROM Reservasi r WHERE r.acara = :acara"),
    @NamedQuery(name = "Reservasi.findByPermintaan", query = "SELECT r FROM Reservasi r WHERE r.permintaan = :permintaan"),
    @NamedQuery(name = "Reservasi.findByJumlah", query = "SELECT r FROM Reservasi r WHERE r.jumlah = :jumlah")})
public class Reservasi implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id", nullable = false)
    private Integer id;
    @Basic(optional = false)
    @Column(name = "nama", nullable = false, length = 20)
    private String nama;
    @Basic(optional = false)
    @Column(name = "telepon", nullable = false, length = 20)
    private String telepon;
    @Basic(optional = false)
    @Column(name = "email", nullable = false, length = 50)
    private String email;
    @Basic(optional = false)
    @Column(name = "reservasi", nullable = false)
    private int reservasi;
    @Basic(optional = false)
    @Column(name = "tanggal", nullable = false, length = 10)
    private String tanggal;
    @Basic(optional = false)
    @Column(name = "acara", nullable = false, length = 140)
    private String acara;
    @Basic(optional = false)
    @Column(name = "permintaan", nullable = false, length = 200)
    private String permintaan;
    @Basic(optional = false)
    @Column(name = "jumlah", nullable = false, length = 3)
    private String jumlah;

    public Reservasi() {
    }

    public Reservasi(Integer id) {
        this.id = id;
    }

    public Reservasi(Integer id, String nama, String telepon, String email, int reservasi, String tanggal, String acara, String permintaan, String jumlah) {
        this.id = id;
        this.nama = nama;
        this.telepon = telepon;
        this.email = email;
        this.reservasi = reservasi;
        this.tanggal = tanggal;
        this.acara = acara;
        this.permintaan = permintaan;
        this.jumlah = jumlah;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getTelepon() {
        return telepon;
    }

    public void setTelepon(String telepon) {
        this.telepon = telepon;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getReservasi() {
        return reservasi;
    }

    public void setReservasi(int reservasi) {
        this.reservasi = reservasi;
    }

    public String getTanggal() {
        return tanggal;
    }

    public void setTanggal(String tanggal) {
        this.tanggal = tanggal;
    }

    public String getAcara() {
        return acara;
    }

    public void setAcara(String acara) {
        this.acara = acara;
    }

    public String getPermintaan() {
        return permintaan;
    }

    public void setPermintaan(String permintaan) {
        this.permintaan = permintaan;
    }

    public String getJumlah() {
        return jumlah;
    }

    public void setJumlah(String jumlah) {
        this.jumlah = jumlah;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reservasi)) {
            return false;
        }
        Reservasi other = (Reservasi) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Reservasi[ id=" + id + " ]";
    }

    public void setreservasi(String reservasi) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
